package com.pubinfo.passbook.engine.cell.logic.medicine.payinformation;

import com.pubinfo.passbook.common.model.ruler.PayInformation;
import org.apache.commons.lang3.StringUtils;

import java.math.BigDecimal;

/**
 * 竖版并且没有医保
 *
 * @author zhouch
 * @date 2022/3/14 8:48
 */
public class VerticalAndNotInsuranceUnit extends PayInformationLogicUnit {

    @Override
    public String getName() {
        return "是否竖版并且没有医保";
    }

    @Override
    public Boolean then(PayInformation data, BigDecimal result) {
        if (StringUtils.isNotBlank(data.getPatientMedicalInsuranceType())) {
            return !data.getPatientMedicalInsuranceType().contains("医保");
        }
        return false;
    }
}
